#include "Collision.h"

bool TestCollision(const BoundingBox& a, const BoundingBox& b)
{
	float t;
	if ((t = a.position.x - b.position.x) > b.size.x || -t > a.size.x)
		return false;
	if ((t = a.position.y - b.position.y) > b.size.y || -t > a.size.y)
		return false;
	if ((t = a.position.z - b.position.z) > b.size.z || -t > a.size.z)
		return false;

	return true;
}